package com.yanghx.order.server.controller;

import com.yanghx.order.server.config.GirlConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 没有实现bus自动刷新配置。请求config的/bus/refresh好像没有向mq发送消息
 *
 * @author yangHX
 * createTime  2019/9/13 21:41
 */
@RefreshScope
@RestController
public class GirlController {

    @Autowired
    private GirlConfig girlConfig;

    @GetMapping("/girl/print")
    public String print() {
        return "name:" + girlConfig.getName() + " age:" + girlConfig.getAge();
    }
}
